<template>
	<view>
		<view class="">
			<view class="fs28 " >
				<view class="mt-4 ml-4"  >当前绑定的手机号是：{{list.mobile}}</view>
			</view>
			<view class="input d-flex">
				<image src="@/static/img/login/yanzhengma.png" mode="widthFix" style="width: 40rpx;"></image>
				<input class="flex-1" type="text" placeholder="请输入验证码">
				<view class="fs28" style="color: #29ad97;" @tap="code">获取验证码</view>
			</view>
			<!-- <view class="">绑定手机号后</view> -->
			<button class="btn" @tap="newPhone">下一步</button>
		</view>
		
		<view class="input bg ls2">
			<view class="">原手机无法接电话</view>
			<view class="phone">原手机无法接电话</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:{}
			};
		},
		onLoad() {
			this.getusif()
		},
		methods: {
			async getusif() {
				let res = await this.$myRequest({
					url:'/getUserInfo',
					methods: 'POST',
					data: {
						token: uni.getStorageSync('token')
					}
				})
				if(res.data.status==1){
					this.list=res.data.data
					// console.log(this.list)
				}
			},
			
			newPhone() {
				uni.navigateTo({
					url:'./newPhone'
				})
			},
			async code(){
				let res = await this.$myRequest({
					url:'/getCode/'+this.list.mobile
				})
				uni.showToast({
					title: '发送成功',
					icon: "none"
				})
			},
		},
	}
</script>

<style lang="scss">
	page{
		background-color: #f5f5f5;
	}
	.input{
		width: 82%;
		height: 100%;
		margin: 20rpx auto;
		border: 2rpx solid #f5f5f5;
		background-color: white;
		padding: 30rpx;
		border-radius: 20rpx;
	}
	input{
		padding: 0 20rpx;
	}
	.btn{
		border-radius: 10rpx;
		color: white;
		background-color: #29ad97;
		margin: 40rpx;
	}
	.bg{
		font-size: 28rpx;
		
		background-color: #f4e9ea;
	}
	.phone{
		color: #999;
		margin-top: 20rpx;
	}
</style>
